package com.demo.di.complex;

import java.util.*;

/**
 * 描述：
 *
 * @author lida
 * @time 2019/10/11 16:15
 */
public class ComplexInject {
	private Map<String, Object> map;
	private Properties props;
	private Set<String> set;
	private List<String> list;

	public void setMap(Map<String, Object> map) {
		this.map = map;
	}

	public void setProps(Properties props) {
		this.props = props;
	}

	public void setSet(Set<String> set) {
		this.set = set;
	}

	public void setList(List<String> list) {
		this.list = list;
	}

	public void prtValues(){
		System.out.println("ComplexCValues:");
		System.out.println("map:");
		map.forEach((key1, value) -> System.out.println(key1 + ": " + value.toString()));
		System.out.println("props:");
		for (String key: props.stringPropertyNames()){
			System.out.println(key + ": " + props.getProperty(key));
		}
		System.out.println("set:");
		set.forEach(obj -> System.out.println("value: " + obj));
		System.out.println("list:");
		list.forEach(obj -> System.out.println("value: " + obj));
	}
}
